package com.attilax.corePkg;

import java.util.Random;

import com.attilax.util.randomx;

public class RandomX extends randomx {
	
	public static void main(String[] args) {
		 System.out.println(new RandomX().randomNum(1000, 9999));
	//	System.out.println( new RandomX().minNum(1));
	}
	
//	public   int randomNum(int min, int max) {
//		int beishor=10*(String.valueOf(min).length()-1);
//		int beishor2=10*(String.valueOf( max).length()-1);
//		 Random random = new Random();
//		return Math.abs(random.nextInt())%100;
//	}
	
	public int minNum(int min)
	{ Random random = new Random();
		return Math.abs(random.nextInt())+min;
	}
	

	public   int randomNum(int min, int max) {
		// int max=20;
	   //  int min=10;
	     Random random = new Random();

	     int s = random.nextInt(max)%(max-min+1) + min;
	   //  System.out.println(s);
		return s;
	}
	

}
